import request from '../utils/request';

// 任务创建
export function postTaskCreate(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/create',
        method: 'post',
        data
    });
};
// 任务查询
export function postTaskList(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/list',
        method: 'post',
        data
    });
};

// 预约任务确认
export function confirmTask(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/biz/carApply/confirm',
        method: 'post',
        data
    });
};

// 手动归还
export function carReturnSubmit(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/biz/carReturn/submit',
        method: 'post',
        data
    });
};

export function queryTaskBizCarApply(taskId) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/biz/carApply/detail?taskId=' + taskId,
        method: 'get'
    });
};

export function queryTaskBizCarApplyDetail(taskId) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/biz/carApply/detail?taskId=' + taskId,
        method: 'get'
    });
};

// 安全员预约新增确认
export function taskAddDirver(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/taskAddDirver',
        method: 'post',
        data
    });
};
//车辆预约确认接口
export function carAppointmentConfirm(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/carAppointmentConfirm',
        method: 'post',
        data
    });
};



export function taskCarBorrowAuditApi(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/taskCarBorrowAudit',
        method: 'post',
        data
    });
};

export function getCarBorrowAuditByTaskIdApi(data) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/task/getCarBorrowAuditByTaskId',
        method: 'post',
        data
    });
};


